#ifndef __CONFIG_H__
#define __CONFIG_H__

//WARNING:如果要关闭某个CONFIG，请同时关闭对应的CONFIG_COND

//basic
#define CONFIG_ISA "riscv32"
#define CONFIG_LAUNCH_MODE (SDB) //[(STD)/(SDB)]
// #define CONFIG_TRACE 1 //生成vcd
#define CONFIG_STEP_INST 1
// #define CONFIG_STEP_REG 1 //with bug
// #define CONFIG_HOLD 1
// #define CONFIG_HOLD_PC (0x30000078)

//pmem(flash)
//定义模拟的存储
#define CONFIG_PC_RESET_OFFSET 0x0
#define CONFIG_MBASE 0x30000000 // start
#define CONFIG_MSIZE 0x0fffffff // size
#define CONFIG_PMEM_MALLOC 1    // pmem[start,start+size]

//device-soc
#define CONFIG_DBASE_UART   0x10000000
#define CONFIG_DSIZE_UART   0x00000fff
#define CONFIG_DSIZE_CLINT  0x02000000
#define CONFIG_DSIZE_CLINT  0x0000ffff
// #define CONFIG_DBASE_FLASH 0x30000000 // start
// #define CONFIG_DSIZE_FLASH 0x0fffffff // size
// #define CONFIG_DBASE_PSRAM 0x80000000 // start
// #define CONFIG_DSIZE_PSRAM 0x1fffffff // size
#define CONFIG_DBASE_SDRAM 0xa0000000 // start
#define CONFIG_DSIZE_SDRAM 0x1fffffff // size
#define CONFIG_DMEM_MALLOC  1
//device handled only by verilator
#define CONFIG_DBASE 0xd0000000
#define CONFIG_DSIZE 0x08000000


//TRACE
// #define CONFIG_ITRACE 1
// #define CONFIG_ITRACE_COND 1
#define CONFIG_MAX_BUF_SIZE 1000
#define CONFIG_MAX_INST_LEN 60
#define CONFIG_LOG_START 0
#define CONFIG_LOG_END 10000

// #define CONFIG_FTRACE 1
// #define CONFIG_FTRACE_COND 1

// #define CONFIG_DTRACE 1

#define CONFIG_DIFFTEST 1
#define CONFIG_DIFFTEST_COND 1

// #define CONFIG_MTRACE 1
// #define CONFIG_MTRACE_COND 1
// #define CONFIG_MTRACE_SIZE 100


//vga
// #define CONFIG_VGA_MOUNT 1
// #define CONFIG_VGA_SIZE_800x600 1
// #define CONFIG_VGA_UPDATE 1

#endif
